<template>
  <div class="header">
    <h1>我是Header</h1>
    <p>Count的值是{{count}}</p>
    <p>价格是{{price}}</p>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name:"Header",
  computed:{
    ...mapState(["count","price"]),
  }
};
</script>


<style scoped>
.header {
  margin: 30px;
  background: yellowgreen;
}
</style>